import store from 'store';
export default {
    paging:{
        url:'application/getAppList.do',
        ajax:{
            type:'POST'
        }
    },
    dataField:'appList',
    fields:['appId'],
    columns:[{
        width:'10%',
        title:'应用名称',
        field:'appName',
        nowrap:false,
        template:true,
        filter:null,
        content:`
        <a href="#!/platform/appdetail/<%$value.appId%>" class="f-cblue"><%$value.appName%></a>
        `
    },{
        width:'12%',
        title:'企业名称',
        field:'enterpriseName',
        nowrap:false,
        className:'f-toeup'
        
    },{
        width:'6%',
        title:'标签',
        field:'appLabelId',
        nowrap:false
    },{
        width:'6%',
        title:'类型',
        field:'appType',
        nowrap:false,
        filter(val,field){
            return store(field)[val]
        }
    },{
        width:'8%',
        title:'联系人',
        field:'contactName',
        nowrap:false
    },{
        width:'8%',
        title:'联系电话',
        field:'phone',
        nowrap:false
    },{
        width:'6%',
        title:'今日流量',
        field:'todayFlow',
        nowrap:false
    },{
        width:'6%',
        title:'周合计流量',
        field:'weekFlow',
        nowrap:false,
        filter(val){
            return val + '<i class="iconfont m-icon f-cblue e-ml5">&#xe6aa;</i>'
        }
    },{
        width:'6%',
        title:'累计流量',
        field:'totalFlow',
        nowrap:false
    },{
        width:'9%',
        title:'上线时间',
        field:'upTime',
        nowrap:false
    },{
        width:'9%',
        title:'创建时间',
        field:'createTime',
        nowrap:false
    },{
        width:'8%',
        title:'状态',
        field:'status',
        nowrap:false,
        className:'status',
        showtitle:false,
        filter(val,field){
            field =field +'app';
            return store(field)[val];
        }
    },{
        title:'操作',
        nowrap:false,
        filter:null,
        template:true,
        content:`
        <div class="m-operation">
        <%if $value.appType == '0'%>
            <a href="javascript:void(0)" class="j-adjust f-cblue">调整</a>
        <%elseif $value.appType == '1'%>
            <%if $value.status == '2'%>
                <a href="javascript:void(0)" class="j-verify f-cblue">审核</a>
            <%elseif $value.status == '1'%>
                <a href="javascript:void(0)" class="j-adjust f-cblue">调整</a>
            <%/if%>
        <%/if%>
        </div>
        `
    }]
}